package com.mjh.zhujianju.excel;

import org.apache.commons.lang3.StringUtils;

import java.util.List;

/**
 * @program: bidding
 * @description:
 * @author: WT1124
 * @create: 2018-08-08 10:01
 **/
public class SheetInfo {

    // 标题所在的行，起始行是0，不是1
    public static final int DEFAILT_TITLE_INDEX = 0;
    
    public static final String DEFAILT_TITLE_INFO = "信息表";

    /**
     * 需要读取数据字段中文名对应的entity属性名
     */
    private List<ColumnProperty> columnProperties;

    private int titleRowIndex = DEFAILT_TITLE_INDEX;

    /**
     * 需要读取数据的sheet的名字
     */
    private String sheetName = "Sheet1";

    public SheetInfo(String sheetName) {
        if(StringUtils.isNotEmpty(sheetName)){
            this.setSheetName(sheetName);
        }
    }

    public List<ColumnProperty> getColumnProperties() {
        return columnProperties;
    }

    public void setColumnProperties(List<ColumnProperty> columnProperties) {
        this.columnProperties = columnProperties;
    }

    public int getTitleRowIndex() {
        return titleRowIndex;
    }

    public void setTitleRowIndex(int titleRowIndex) {
        this.titleRowIndex = titleRowIndex;
    }

    public String getSheetName() {
        return sheetName;
    }

    public void setSheetName(String sheetName) {
        this.sheetName = sheetName;
    }
}
